package com.niiwoo.civet.account.service;


import com.niiwoo.civet.account.dto.request.CompanyAccountRequestDTO;
import com.niiwoo.civet.account.dto.response.AccountCompanyDTO;

/**
 * 企业帐户服务
 * @author TomXue
 * @since 2018-04-23
 */
public interface AccountCompanyDubboService {
    /**
     * 通过机构ID查询合作机构信息
     * @param orgId
     * @return
     */
    default AccountCompanyDTO getCooperateOrgByOrgId(String orgId)  {return null;}

    /**
     * 通过机构ID查询合作机构信息
     * @param orgId
     * @return
     */
    default AccountCompanyDTO getGuaranteeOrgByOrgId(String orgId)  {
        throw new UnsupportedOperationException("unimplemented");
    }

    AccountCompanyDTO getInvestOrgByOrgId(String orgId);

    /**
     * 机构是否已开通存管帐户?
     * @param orgId
     * @return
     */
    default boolean isOpenAccountCompanyByOrgCode(String orgId){return false;}

    /**
     * 通过组织机构代码获取机构存管开户信息
     * @param businessLicense
     * @return
     */
    default AccountCompanyDTO getAccountCompanyByBusinessLicense(String businessLicense){return null;};

    /**
     * 企业借款人是否在该机构开通存管账户
     *
     * @param orgId
     * @param companyOrgId
     * @return
     */
    default boolean isOpenAccountCompanyInOrg(String orgId, String companyOrgId) {
        return false;
    }

    /**
     * 修改
     * @param reqDto
     * @return
     */
    default boolean updateAccountCompany(CompanyAccountRequestDTO reqDto){
        throw new UnsupportedOperationException("unimplemented");
    }

    /**
     * 根据机构ID查询企业帐户信息(一个企业借款人只能推送至一家机构推标)
     * @param orgId 机构ID
     * @return
     */
    default AccountCompanyDTO queryAccountCompanyByUserId(String orgId) {
        return null;
    }

    default AccountCompanyDTO queryAccountCompanyByUserIdAndOrgIdWithAccountType(String userId,String orgId,Byte accountType) {
        return null;
    }
}
